*(ERROR.CMD - Sample error handler for the OPEN command)
SET MESSAGES OFF
SET ERROR MESSAGES OFF
SET ERROR VARIABLE errvar
SET VAR looper = 1
WHILE looper LE 3 THEN
   NEWPAGE
   FILLIN dbname USING "Enter the database name: " AT 4 5
   OPEN .dbname
   IF errvar NE 0 THEN
      SET VAR looper = (.looper + 1)
      IF looper GT 3 THEN
         WRITE "No database exists with the name you entered." +
         AT 5 5
         WRITE "Press any key to exit." AT 6 5
         PAUSE
      ELSE
         WRITE "Incorrect database name - try again. " AT 5 5
         WRITE "Press any key to continue." at 6 5
         PAUSE
      ENDIF
   ELSE
      WRITE "Database opened." AT 5 5
      BREAK
   ENDIF
ENDWHILE
CLEAR looper errvar dbname
SET MESSAGES ON
SET ERROR MESSAGES ON
RETURN